import 'package:dio/dio.dart';

const appID = 'AE7XCI';

class Server {
  static Server? _manger;
  final api = Dio();
  Server._();

  static Server share() {
    _manger ??= Server._();
    return _manger!;
  }

  Future<bool> getState() async {
    final result = await api.get('http://106.14.152.141/appinfo/$appID');
    if (result.data != null && result.data['status'] != null) {
      return result.data['status'] == 1;
    }
    return false;
  }
}
